package com.heima.model.article.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
/**
 * APP已发布文章配置表
 */
@Data
@TableName("ap_article_config")
public class ApArticleConfig implements Serializable {
    public ApArticleConfig(Long articleId){
        this.articleId = articleId;  //文章id
        this.isComment = true;  //设置默认可以怕评论
        this.isForward = true;  //设置默认可以转发
        this.isDelete = false;  //设置默认可以删除
        this.isDown = false;  //设置默认可以下载
    }

    @TableId(value = "id",type = IdType.ID_WORKER)
    private Long id;

    //文章id
    @TableField("article_id")
    private Long articleId;

    //是否可评论: true: 可以评论 1   false: 不可评论 0
    @TableField("is_comment")
    private Boolean isComment;

    //是否转发: true:可以转发 1    false:不可转发 0
    @TableField("is_forward")
    private Boolean isForward;

    //是否下架: true:下架 1    false:没有下架 0
    @TableField("is_down")
    private Boolean isDown;

    //是否已删除: true:删除 1    false:没有删除 0
    @TableField("is_delete")
    private Boolean isDelete;
}
